package mi.payment.settings;

import java.io.Serializable;

import mi.payment.constants.Configs;

/**
 * 网络参数设置
 */
public class NetworkParamSettings implements Serializable {

    // 文件无变化
    private static final long serialVersionUID = 4070688032707478848L;

    // 网络参数设置的key
    public final static String NETWORK_PARAMS_KEY = "networkParams";

    private String tPdu = Configs.defaultTPdu;
    private String hostIpAddress = Configs.defaultIPAddress;                // 主机Ip地址
    private String hostPort = Configs.defaultPort;                          // 主机端口
    private String spareHostIpAddress = Configs.defaultSpareIPAddress;      // 备份服务器IP
    private String spareHostPort = Configs.defaultPort;                     // 备份服务器端口	port

    private String thirdServerIpAddress;
    private String thirdServerPort;

    private String thirdServerIpAddressBackup;
    private String thirdServerPortBackup;

    private boolean automaticGetIp = true;                                  // 是否自动获取IP
    private String communicationTimeout = "60";                             // 通讯超时时间S
    private int transactionRepeatNum = 3;                   // 交易重播次数	3
    private int connectionMode = 0;                         // 连接方式	0短连接／1长连接
    private int networkDefaultConfiguration = 1;            // 默认网络配置	配置1 ／配置2
    private boolean networkInterventionFunction = false;    // 互联网接入功能
    private boolean dns = false;                            // DNS是否启用

    public String getTPdu() {
        return tPdu;
    }

    public String getHostIpAddress() {
        return hostIpAddress;
    }

    public String getHostPort() {
        return hostPort;
    }

    public String getCommunicationTimeout() {
        return communicationTimeout;
    }

    public boolean isAutomaticGetIp() {
        return automaticGetIp;
    }

    public String getSpareHostIpAddress() {
        return spareHostIpAddress;
    }

    public String getSpareHostPort() {
        return spareHostPort;
    }

    public int getTransactionRepeatNum() {
        return transactionRepeatNum;
    }

    public int getConnectionMode() {
        return connectionMode;
    }

    public int getNetworkDefaultConfiguration() {
        return networkDefaultConfiguration;
    }

    public boolean isNetworkInterventionFunction() {
        return networkInterventionFunction;
    }

    public boolean isDns() {
        return dns;
    }

    public void setTPdu(String tPdu) {
        this.tPdu = tPdu;
    }

    public void setHostIpAddress(String hostIpAddress) {
        this.hostIpAddress = hostIpAddress;
    }

    public void setHostPort(String hostPort) {
        this.hostPort = hostPort;
    }

    public void setCommunicationTimeout(String communicationTimeout) {
        this.communicationTimeout = communicationTimeout;
    }

    public void setAutomaticGetIp(boolean automaticGetIp) {
        this.automaticGetIp = automaticGetIp;
    }

    public void setSpareHostIpAddress(String spareHostIpAddress) {
        this.spareHostIpAddress = spareHostIpAddress;
    }

    public void setSpareHostPort(String spareHostPort) {
        this.spareHostPort = spareHostPort;
    }

    public void setTransactionRepeatNum(int transactionRepeatNum) {
        this.transactionRepeatNum = transactionRepeatNum;
    }

    public void setConnectionMode(int connectionMode) {
        this.connectionMode = connectionMode;
    }

    public void setNetworkDefaultConfiguration(int networkDefaultConfiguration) {
        this.networkDefaultConfiguration = networkDefaultConfiguration;
    }

    public void setNetworkInterventionFunction(boolean networkInterventionFunction) {
        this.networkInterventionFunction = networkInterventionFunction;
    }

    public void setDns(boolean dns) {
        this.dns = dns;
    }

    public String getThirdServerIpAddress() {
        return thirdServerIpAddress;
    }

    public void setThirdServerIpAddress(String thirdServerIpAddress) {
        this.thirdServerIpAddress = thirdServerIpAddress;
    }

    public String getThirdServerPort() {
        return thirdServerPort;
    }

    public void setThirdServerPort(String thirdServerPort) {
        this.thirdServerPort = thirdServerPort;
    }

    public String getThirdServerIpAddressBackup() {
        return thirdServerIpAddressBackup;
    }

    public void setThirdServerIpAddressBackup(String thirdServerIpAddressBackup) {
        this.thirdServerIpAddressBackup = thirdServerIpAddressBackup;
    }

    public String getThirdServerPortBackup() {
        return thirdServerPortBackup;
    }

    public void setThirdServerPortBackup(String thirdServerPortBackup) {
        this.thirdServerPortBackup = thirdServerPortBackup;
    }


}
